Add support for attributes on constants#1082
Merged
nikic merged 1 commit intonikic:masterfrom Apr 29, 2025
Merged
Conversation
nikic
reviewed
Apr 29, 2025
Owner
nikic
left a comment
There was a problem hiding this comment.
Please also add pretty printer support and a pretty printer test.
This will also need an extra resolveAttrGroups call in NameResolver.
(See https://github.com/nikic/PHP-Parser/blob/master/CONTRIBUTING.md#adding-support-for-new-php-syntax for the full checklist.)
75d5451 to
3f6f8a4
Compare
Contributor
Author
Done, thanks for the pointer |
nikic
approved these changes
Apr 29, 2025
nikic
reviewed
Apr 29, 2025
Owner
nikic
left a comment
There was a problem hiding this comment.
This should fix the phpstan errors I believe.
nikic
reviewed
Apr 29, 2025
Owner
|
Also need to regenerate the parsers. |
Just merged in php/php-src@3f03f7e, updating this parser is needed to be able to use attributes on constants in the stub files.
270df0f to
b3fd332
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just merged in php/php-src@3f03f7e, updating this parser is needed to be able to use attributes on constants in the stub files.